package svc

import (
	"commodity/api/internal/config"
	"commodity/commodityrpc/commodityrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config       config.Config
	CommodityRpc commodityrpcclient.Commodityrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:       c,
		CommodityRpc: commodityrpcclient.NewCommodityrpc(zrpc.MustNewClient(c.CommodityRpc)),
	}
}
